home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr11
/
pdox693.zip
/
TI502.ASC
< prev
next >
Wrap
Text File
|
1992-08-12
|
4KB
|
133 lines
PRODUCT : Paradox NUMBER : 502
VERSION : 1 & 2
OS : DOS
DATE : August 12, 1992 PAGE : 1/2
TITLE : ONE-TO-MANY RELATIONSHIP IN A MULTI-ENTRY FORM
It is possible to have a One-to-Many relationship in a Multi-
Entry operation without having to duplicate information. Creating
multiple fields for this presents many problems of its own, and
is generally not the preferred method. However, you can use the
following information to create a One-to-Many relationship in a
Multi-Entry Form.
Set up a TRANSACTION file (the one that will contain the tasks)
so that a single record contains a single task. Create a JOB
file, which must be keyed. Set up your Multi-Entry Form as
discussed on pages 148 through 152 of the User's Guide.
The trick to this method is the duplication of the parent
information (your JOB information) automatically. If you enter
duplicate records that will be Multi-Entered into a keyed table,
only one of the duplicates will be posted into the keyed file,
the rest bounce off. Of course, all of the information going
into the TRANSACTION file will arrive properly.
There are two methods to duplicating the information in the
parent part of the Multi-Entry screen:
1. If you are doing your Multi-Entry in a script, you should
use WAIT RECORD during entry. You need to have an UNTIL
key defined to duplicate the parent information in a new
record and another defined to advance to the next
completely new record. A third key should be defined as
the quit entering key. For example, the following can be
used for editing keystrokes:
o [F3] for the duplicate parent key.
o [F4] as the entirely new record key.
o [F2] for ending edit.
On [F3] use CopyToArray to grab the current record, DOWN
to go to a new blank record, then use a FOR..NEXT loop to
load the fields of the parent record from the array. Then,
return to your WAIT RECORD. On a [F4] simply use DOWN and
on [F2] Do_It.
PRODUCT : Paradox NUMBER : 502
VERSION : 1 & 2
OS : DOS
DATE : August 12, 1992 PAGE : 2/2
TITLE : ONE-TO-MANY RELATIONSHIP IN A MULTI-ENTRY FORM
2. If you are doing Multi-Entry interactively, without a
script, there is an easy way to do the duplication.
Simply follow these steps:
a. While you are in the Multi-Entry mode, type in a
complete record.
b. Move to a blank record.
c. Press [ALT-F3] to begin an Instant Script Record.
d. Move to the first field on your form that needs to
be duplicated.
e. Press [CTRL-D] (the ditto key). This will copy the
data from the preceding record into the current
record.
f. Move to the next record and press [CTRL-D].
Continue this until all the fields from the "parent" table
have been duplicated. Press [ALT-F3] again to end the
Instant Script Record. You have now created a "Script"
that will copy the information for you.
DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.